package  
{
	import flash.display.Graphics;
	import flash.geom.Matrix;
	/**
	 * ...
	 * @author Jean-Marie PETIT@hsh
	 */
	public class Degrade 
	{
		private var m:Matrix
		
		public function Degrade(gr: Graphics, l:int, h:int, ray:int, couleurs:Array, alphas:Array, ratios:Array, angle:int=90, dx:int=0, dy:int=0) 
		{
			m = new Matrix();
			
			m.createGradientBox(l, h, Math.PI / 180 * angle, dx, dy);
			gr.beginGradientFill("linear", couleurs, alphas, ratios, m);
			gr.drawRoundRect(0, 0, l, h, ray);
		}
		
	}

}